﻿@{
    Layout = "~/Views/Shared/_Layout.cshtml";
}

@section Header{
    <style>
        .ahoit-msg-line {
            position: relative;
            width: 100%;
            line-height: 39px;
            border-bottom: 1px solid #ccc;
        }

            .ahoit-msg-line > a {
                cursor: pointer;
                font-size: 12px;
                white-space: nowrap;
                text-overflow: ellipsis;
                overflow: hidden;
                display: block;
                width: 85%;
            }

            .ahoit-msg-line > label {
                position: absolute;
                top: 0;
                right: 0;
                margin-bottom: 0;
                color: #333;
                font-size: 12px;
                font-weight: 400;
            }
    </style>
}

<div class="layui-row" style="margin:5px;">
    <div class="layui-col-xs6" style="padding-bottom: 5px;">
        <div class="layui-card">
            <div class="layui-card-header">
                <i class="fa fa-coffee"></i>&nbsp;&nbsp;待办任务
                <span class="pull-right"><a id="moretask" style="cursor:pointer;">更多&nbsp;>>&nbsp;</a></span>
            </div>
            <div class="layui-card-body" id="task" style="min-height:200px;">

            </div>
        </div>
    </div>
    <div class="layui-col-xs6" style="padding-bottom: 5px;">
        <div class="layui-card">
            <div class="layui-card-header">
                <i class="fa fa-coffee"></i>&nbsp;&nbsp;委托待办
                <span class="pull-right"><a id="moretaskDelegate" style="cursor:pointer;">更多&nbsp;>>&nbsp;</a></span>
            </div>
            <div class="layui-card-body" id="taskDelegate" style="min-height:200px;">

            </div>
        </div>
    </div>
    <div class="layui-col-xs12" style="padding-bottom: 5px;">
        <div class="layui-card">
            <div class="layui-card-header">
                <i class="fa fa-bullhorn"></i>&nbsp;&nbsp;公告通知
                <span class="pull-right"><a id="newsMore" style="cursor:pointer;">更多&nbsp;>>&nbsp;</a></span>
            </div>
            <div class="layui-card-body" id="news" style="min-height:200px;">

            </div>
        </div>
    </div>

</div>

<script id="templeteNews" type="text/html">
    {{each rows item index}}
    <div class="ahoit-msg-line">
        <a style="text-decoration: none;" luckyu-id="{{item.news_id}}" title="{{item.title}}">
            ●&nbsp;&nbsp; {{if item.sort  > 0}}  <i class="fa fa-star"></i>  {{/if}}【{{item.category}}】{{item.title}}
        </a>
        <label>{{item.publishtime | dateFormat 'yyyy-MM-dd'}}</label>
    </div>
    {{/each}}
</script>

<script id="templeteTask" type="text/html">
    {{each rows item index}}
    <div class="ahoit-msg-line">
        <a style="text-decoration: none;" luckyu-nodetype="{{item.nodetype}}" luckyu-taskId="{{item.task_id}}" luckyu-instanceId="{{item.instance_id}}" luckyu-processId="{{item.process_id}}" title="{{item.processname}}">
            ●&nbsp;&nbsp;【{{item.flowname}}】{{item.nodename}}  {{item.processname}}
        </a>
        <label>{{item.createtime | dateFormat 'yyyy-MM-dd'}}</label>
    </div>
    {{/each}}
</script>

@section Footer{
    <script src="~/lib/art-template/template-web.js"></script>
    <script>
        template.defaults.imports.dateFormat = function (date, format) {
            return new Date(date).format(format);
        };
    </script>
    @Html.AppendJs("~/js/luckyu-staticdata.js")
    @Html.AppendJs("~/Views/Home/Home.js")
}
